package com.newzqxq.common.utils.sendSMS;

import org.springframework.util.Base64Utils;
import org.springframework.util.StringUtils;

/**
 * @author : 苦智
 * @Description ：
 * @Date : 2017-12-08 20:25
 **/
public class SMSSignUtils {
    public static String sign(String priKey) throws Exception{
        if (StringUtils.isEmpty(priKey)){
            throw new IllegalArgumentException("缺少参数prikey");
        }
        //priKey+=":";
        byte[] bytes= Base64Utils.encode(priKey.getBytes());
        return "Basic "+new String(bytes);
    }
}
